const app = getApp()
Page({
  data: {
    domainName: app.domainName,
    xiangs:[],
    isfrom:1
  },
  onLoad(options) {
    var _this=this;
    if(typeof(options.xid) != 'undefined'){
      wx.request({
        url: app.domainName + 'web/?c=getxiangqing',
        method: 'POST',
        data: {id:options.xid}, header: { 'content-type': 'application/x-www-form-urlencoded' },
        success: function (res) {
             _this.setData({xiangs: res.data.x})
        }});
    }
    if(typeof(options.isf) != 'undefined'){
       _this.setData({isfrom:options.isf})
    }
    console.log(options)
  
  },
  goBack(){
    var _isfrom=this.data.isfrom;
    if(2 == _isfrom){
      wx.redirectTo({url: '/pages/index/index?isf=2'})
    }else{
      wx.redirectTo({url: '/pages/saisi/index'})
    }
    return;
  }
  
 
})
